-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(rpc): make controller decorator name optional #491
Conversation
The rpc controller metadata name would then default to the name of the class Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #491 +/- ##
==========================================
+ Coverage 78.25% 78.26% +0.01%
==========================================
Files 186 186
Lines 19761 19763 +2
Branches 5082 5083 +1
==========================================
+ Hits 15463 15467 +4
+ Misses 4298 4296 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Marcus S. Abildskov <8391194+marcus-sa@users.noreply.github.com>
Thanks! |
@marcj what do you think about adding a reusable function for getting the name of a class type? function getClassTypeName(classType: ClassType): string {
return reflect(classType).typeName || classType.name;
} |
Summary of changes
Use case: not having to explicitly specify a name for a controller
https://github.com/marcus-sa/ngkit/blob/main/apps/example-cli/src/app.controller.ts
Relinquishment of Rights
Please mark following checkbox to confirm that you relinquish all rights of your changes: